package com.base.app_core.service.user.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by xiangheng.song on 2017/3/10.
 */
public class Address implements Parcelable {

    /**
     * id : 13
     * user_id : 7
     * username : 赵亚斌
     * status : 0
     * mobile : 15900000000
     * telephone : -
     * province_id : 1
     * province : 北京
     * city_id : 2
     * city : 北京市
     * area_id : 15
     * area : 昌平区
     * idcard_img : null
     * idcard : null
     * detail : 北京市海淀区
     * created_at : 2016-05-17 17:33:57
     * updated_at : 2017-08-20 13:11:22
     */

    private Long id;
    private Long user_id;
    private String username;
    private int status;
    private String mobile;
    private String telephone;
    private Long province_id;
    private String province;
    private Long city_id;
    private String city;
    private Long area_id;
    private String area;
    private String idcard_img;
    private String idcard;
    private String detail;
    private String created_at;
    private String updated_at;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUser_id() {
        return user_id;
    }

    public void setUser_id(Long user_id) {
        this.user_id = user_id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public Long getProvince_id() {
        return province_id;
    }

    public void setProvince_id(Long province_id) {
        this.province_id = province_id;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public Long getCity_id() {
        return city_id;
    }

    public void setCity_id(Long city_id) {
        this.city_id = city_id;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public Long getArea_id() {
        return area_id;
    }

    public void setArea_id(Long area_id) {
        this.area_id = area_id;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getIdcard_img() {
        return idcard_img;
    }

    public void setIdcard_img(String idcard_img) {
        this.idcard_img = idcard_img;
    }

    public String getIdcard() {
        return idcard;
    }

    public void setIdcard(String idcard) {
        this.idcard = idcard;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public String getCreated_at() {
        return created_at;
    }

    public void setCreated_at(String created_at) {
        this.created_at = created_at;
    }

    public String getUpdated_at() {
        return updated_at;
    }

    public void setUpdated_at(String updated_at) {
        this.updated_at = updated_at;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeValue(this.id);
        dest.writeValue(this.user_id);
        dest.writeString(this.username);
        dest.writeInt(this.status);
        dest.writeString(this.mobile);
        dest.writeString(this.telephone);
        dest.writeLong(this.province_id);
        dest.writeString(this.province);
        dest.writeLong(this.city_id);
        dest.writeString(this.city);
        dest.writeLong(this.area_id);
        dest.writeString(this.area);
        dest.writeString(this.idcard_img);
        dest.writeString(this.idcard);
        dest.writeString(this.detail);
        dest.writeString(this.created_at);
        dest.writeString(this.updated_at);
    }

    public Address() {
    }

    protected Address(Parcel in) {
        this.id = (Long) in.readValue(Long.class.getClassLoader());
        this.user_id = (Long) in.readValue(Long.class.getClassLoader());
        this.username = in.readString();
        this.status = in.readInt();
        this.mobile = in.readString();
        this.telephone = in.readString();
        this.province_id = in.readLong();
        this.province = in.readString();
        this.city_id = in.readLong();
        this.city = in.readString();
        this.area_id = in.readLong();
        this.area = in.readString();
        this.idcard_img = in.readString();
        this.idcard = in.readString();
        this.detail = in.readString();
        this.created_at = in.readString();
        this.updated_at = in.readString();
    }

    public static final Creator<Address> CREATOR = new Creator<Address>() {
        @Override
        public Address createFromParcel(Parcel source) {
            return new Address(source);
        }

        @Override
        public Address[] newArray(int size) {
            return new Address[size];
        }
    };
}
